<template>
  <div class="check-result">
    <div class="main">
      <el-table :data="tableData" max-height="89vh" style="width: 100%">
        <el-table-column prop="title" label="标题" align="center" />
        <el-table-column prop="classes" label="班级" align="center" />
        <el-table-column prop="account" label="学号" align="center" />
        <el-table-column prop="username" label="姓名" align="center" />
        <el-table-column label="检测情况" align="center">
          <template #default="scope">
            <el-tag
                v-if="scope.row.yn"
                size="small"
                type="success"
            >
              已检测
            </el-tag>
            <el-tag
                v-if="!scope.row.yn"
                size="small"
                type="danger"
            >
              未检测
            </el-tag>
          </template>
        </el-table-column>
      </el-table>
    </div>
  </div>
</template>

<script>
import {getNucleicAcidResult} from "@/network/nucleicAcidResult";

export default {
  name: "CheckNucleicAcidFilterResult",
  data() {
    return {
      tableData: []
    }
  },
  mounted() {
    this.init()
  },
  methods: {
    init() {
      getNucleicAcidResult()
        .then(res => {
          this.tableData = res.data.data
        })
    }
  }
}
</script>

<style scoped>
.check-result{
  position: absolute;
  left: 12%;
  top: 6%;
  width: 88%;
  height: 94%;
  background-color: rgb(245, 245, 245);
}
.main{
  padding: 15px;
  display: flex;
  flex-direction: column;
}

</style>